//package com.daocao.hua.impl;
//
//import android.content.Context;
//
//import com.daocao.hua.constant.Const;
//import com.daocao.hua.http.CallBackListener;
//import com.daocao.hua.http.InterfaceServer;
//import com.daocao.hua.http.InfoCallBack;
//import com.daocao.hua.http.ResponseListener;
//import com.daocao.hua.interfaces.UpdatePwdInfo;
//import com.daocao.hua.model.RequestModel;
//import com.daocao.hua.model.ResponseModel;
//import com.daocao.hua.util.JsonUtil;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * 修改密码数据
// * Created by Master.Dong on 2016/4/13.
// */
//public class UpdatePwdInfoImpl implements UpdatePwdInfo {
//
//    /**
//     * 检查原密码
//     *
//     * @param mContext
//     * @param password
//     * @param callBack
//     */
//    @Override
//    public void getCheckPwdInfo(final Context mContext, String password, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("password", password);
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.CHECK_USER_PASSWORD, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT,new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    ResponseModel model = (ResponseModel) result;
////
////                    if (model.getStatus() == 1) {
////                        callBack.onSuccess(model.getMsg());
////                    } else {
////                        callBack.onFailure(model.getMsg());
////                    }
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//    /**
//     * 获取验证码
//     *
//     * @param mContext
//     * @param type
//     * @param mobile
//     * @param callBack
//     */
//    @Override
//    public void getCodeInfo(Context mContext, String type, String mobile, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("type", type);
//        mapData.put("mobile", mobile);
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.UPDATE_PWD_CODE, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT, new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    ResponseModel model = (ResponseModel) result;
////
////                    if (model.getStatus() == 1) {
////                        callBack.onSuccess(model.getMsg());
////                    } else {
////                        callBack.onFailure(model.getMsg());
////                    }
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//    /**
//     * 检查验证码
//     *
//     * @param mContext
//     * @param mobile
//     * @param verify_code
//     * @param callBack
//     */
//    @Override
//    public void getCheckCodeInfo(Context mContext, String mobile, String verify_code, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("mobile", mobile);
//        mapData.put("verify_code", verify_code);
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.CHECK_UPDATE_PWD_CODE, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT,new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    ResponseModel model = (ResponseModel) result;
////
////                    if (model.getStatus() == 1) {
////                        callBack.onSuccess(model.getMsg());
////                    } else {
////                        callBack.onFailure(model.getMsg());
////                    }
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//    @Override
//    public void getResetPwdInfo(Context mContext, String mobile, String password, String verify_code, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("mobile", mobile);
//        mapData.put("password", password);
//        mapData.put("verify_code", verify_code);
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.RESET_PASSWORD, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT, new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    ResponseModel model = (ResponseModel) result;
////
////                    if (model.getStatus() == 1) {
////                        callBack.onSuccess(model.getMsg());
////                    } else {
////                        callBack.onFailure(model.getMsg());
////                    }
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//    /**
//     * 设置新密码
//     *
//     * @param password
//     * @param callBack
//     */
//    @Override
//    public void getUpdatePwdInfo(Context mContext, String password, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("password", password);
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.UPDATE_PASSWORD, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT, new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    ResponseModel model = (ResponseModel) result;
////
////                    if (model.getStatus() == 1) {
////                        callBack.onSuccess(model.getMsg());
////                    } else {
////                        callBack.onFailure(model.getMsg());
////                    }
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//}
